/*
*************************************
* PocketGTT
*************************************
This file is part of PocketGTT.

PocketGTT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PocketGTT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PocketGTT.  If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick 1.0

Item {

    // clip needed to avoid visual markup of OVI Maps on the bottom bar in linux system
    clip: true

    PassaggiViewContent_StopList {
        id: timesheet
        anchors.fill: parent
        //        height: parent.height
        //        width: parent.width
        //        anchors.horizontalCenter: parent.horizontalCenter
        //        anchors.horizontalCenterOffset: 0
        //        anchors.centerIn: parent

        opacity: 1
    }

    //    PassaggiViewContent_Map {
    //        id: map
    //        anchors.fill: parent

    //        opacity: 0
    //    }

    OviMapTile {
        id: map
        anchors.fill: parent

        opacity: 0

        latitude: myWin.statesMan.fermata.FermataLat
        longitude: myWin.statesMan.fermata.FermataLng
//        zoom: 18
        loadUrl: false
    }

    states: State {
        name: "map"
        PropertyChanges { target: map; opacity: 1 } //; anchors.horizontalCenterOffset: 0 }
        PropertyChanges { target: timesheet; opacity: 0 } //; anchors.horizontalCenterOffset: -width}
        PropertyChanges { target: map; loadUrl: true }
        when: myWin.statesMan.pageview_map
    }
    transitions: Transition {
        NumberAnimation { property: "opacity"; duration: myWin.theme.changetimeS }
        //        NumberAnimation { property: "anchors.horizontalCenterOffset"; duration: myWin.theme.changetimeS }
        //        AnchorAnimation { duration: myWin.theme.changetimeS} // ; easing.type: Easing.OutCubic }
    }

}

